package cii_lib;

public class CCII_ACCESS_SPAR extends CCII_ACCESS_PARAM {
  public CCII_ACCESS_SPAR(CCII_TABLE_INDEX itab, CCII_COMPONENT comp) {super(itab,itab.GetItem().Number*itab.GetItem().Repeat,comp);}
  public int Width()         {return(GetItem().Width);};
  public String Get(int num, int grp) {
    int index=grp*GetItem().Repeat+num;
    int range=GetItem().Number*GetItem().Repeat;
    if (num<0 || grp<0 || index>=range) try {
      throw new CiiLibException("CCII_ACCESS_SPAR",CiiLibException.MSG.INDEX_ERROR);
    } catch (CiiLibException e) {e.printStackTrace();}
    return(GetItem(index).ParStrVal);
  };
  public String Get(int num) {return(Get(0,0));};
  public String Get()        {return(Get(0));};
};
